wayland: Unset button modifiers on pointer enter
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 18 Jan 2016 12:31:35 +0000 (13:31 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 19 Jan 2016 13:17:36 +0000 (14:17 +0100)
Due to implicit grabs, we basically can guarantee that the pointer
won't have any buttons pressed at the time of wl_pointer.enter.
Seems like a good place to unset any button modifiers that might
have been left stale by compositor grabs.

gdk/wayland/gdkdevice-wayland.c

index fd2925c49f66fe7fb6061c473ab1ad266b4b0f51..cf988499317329c6993db8adeb0f3e7a11cc0e6f 100644 (file)
@@ -1072,6 +1072,8 @@ pointer_handle_enter (void              *data,
   device->pointer_focus = wl_surface_get_user_data(surface);
   g_object_ref(device->pointer_focus);
 
+  device->button_modifiers = 0;
+
   device->surface_x = wl_fixed_to_double (sx);
   device->surface_y = wl_fixed_to_double (sy);
   device->enter_serial = serial;